#!/bin/bash

function update_aptsource()
{
	cd /etc/apt ; sudo cp -v sources.list sources.list.bak
	sudo cp -v `pwd`/sources.list /etc/apt
	sudo apt-get update
}

function git_clone()
{
    git_addr="$1"
    dir_github=${HOME}/workdir/github
    cd ${dir_github} ; git clone ${git_addr}
}


function install_vimtools()
{
	sudo apt-get install -y git
	mkdir -p ${HOME}/workdir/github 2>/dev/null
	cd ${HOME}/workdir/github ; \
		git clone -b vimtools-ubuntu-SI \
		https://gitee.com/SeaflyGitee/vimtools \
		vimtools-ubuntu-SI && cd vimtools-ubuntu-SI/ ; \
		bash build_all.sh --all
	return 0
}

sudo apt-get install -y git gcc-multilib
sudo apt-get install -y zsh
sudo apt-get install -y libstdc++6
sudo apt-get install -y lib32stdc++6
sudo apt-get install -y minicom
#sudo apt-get install -y eclipse-jdk
sudo apt-get install -y gcc
sudo apt-get install -y g++
#install_vimtools
sudo apt-get install -y xpad
sudo apt-get install -y tree
sudo apt-get install -y linux-libc-dev:amd64
sudo apt-get install -y bison
sudo apt-get install -y libncurses5-dev libncursesw5-dev

## C lib program manual tool
## vimtools 
## wechat TIM and other App store
## eclipse IDE C++ for linux

sudo apt-get install -y lib32ncurses5 lib32z1
sudo apt-get install -y manpages-de  manpages-de-dev  
sudo apt-get install -y manpages-dev glibc-doc manpages-posix-dev manpages-posix manpages-zh
sudo apt-get install -y build-essential
sudo apt-get install -y htop
sudo apt-get install -y iftop

#git_clone "https://github.com/ryancdotorg/brainflayer"
#git_clone "https://github.com/bitcoin/bitcoin"
